package com;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import com.hadoop.test.Test;

public class Application {

	public static void main(String[] args) {
		Class<Test> clazz = Test.class;
		try {
			Test object = clazz.newInstance();
			Method[] methods = clazz.getMethods();
			
			for(Method m : methods){
				if(m.getName().equals(args[0])){
					m.invoke(object);
				}
			}
			
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		} catch (IllegalArgumentException e) {
			e.printStackTrace();
		} catch (InvocationTargetException e) {
			e.printStackTrace();
		}
    }


}

